package com.ccit.greenlife.pojo;

import java.time.LocalDateTime;

public class User {
    private String id; // 用户的唯一标识符
    private String nickname; //昵称
    private String username; // 用户名
    private String avatar; //头像
    private String password; // 密码
    private String email; // 联系方式
    private int level; // 用户等级
    private int isActive; // 是否活跃，通常0表示不活跃，1表示活跃
    private int type; // 用户类型(0为管理员，1为普通用户，2为企业)
    private int exp; // 用户经验，具体格式根据实际业务定义
    private LocalDateTime createTime; // 用户创建时间
    private int integral; // 用户积分
    private LocalDateTime endTime; // 用户注销或到期时间

    public User(String id, String nickname, String username, String avatar, String password, String email, int level, int isActive, int type, int exp, LocalDateTime createTime, int integral, LocalDateTime endTime) {
        this.id = id;
        this.nickname = nickname;
        this.username = username;
        this.avatar = avatar;
        this.password = password;
        this.email = email;
        this.level = level;
        this.isActive = isActive;
        this.type = type;
        this.exp = exp;
        this.createTime = createTime;
        this.integral = integral;
        this.endTime = endTime;
    }

    public User() {
    }

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getIsActive() {
        return isActive;
    }

    public void setIsActive(int isActive) {
        this.isActive = isActive;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getExp() {
        return exp;
    }

    public void setExp(int exp) {
        this.exp = exp;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public int getIntegral() {
        return integral;
    }

    public void setIntegral(int integral) {
        this.integral = integral;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    // ToString, HashCode, Equals methods if needed


    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", nickname='" + nickname + '\'' +
                ", username='" + username + '\'' +
                ", avatar='" + avatar + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", level=" + level +
                ", isActive=" + isActive +
                ", type=" + type +
                ", exp=" + exp +
                ", createTime=" + createTime +
                ", integral=" + integral +
                ", endTime=" + endTime +
                '}';
    }
}
